const jade = require('jade');
const fs = require('fs');
//注意,此处的jade,renderFile只有两个参数
var str = jade.renderFile('./views/main.jade',{pretty:true});
fs.writeFile('./views/index.html',str,function (err,data) {
    if(!err){
        console.log('成功')
    }else{
        console.log('编译失败')
    }
})